package com.cloudbroker.openapi.manage.controller;

import com.cloudbroker.bcs.common.util.VOUtil;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.banner.back.BannerListResult;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.banner.vo.BannerListForm;
import com.cloudbroker.bcs.platform.ltb.bizapi.t2service.business.BannerT2BizService;
import com.cloudbroker.bcs.platform.ltb.common.ext.annotation.SaveLog;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import static com.cloudbroker.bcs.platform.ltb.common.util.RequestUtil.getSingleParameterMapForBody;

/**
 * Created by daibd19671 on 2016/12/20.
 */
@Controller
public class BannerController {

    @Resource
    private BannerT2BizService bannerT2BizService;

    @ResponseBody
    @RequestMapping(value = "/index_banner_list")
    @SaveLog(remark = "banner列表")
    public BannerListResult index_banner_list(HttpServletRequest request, String jsonpcallback){
        BannerListForm form = getSingleParameterMapForBody(request , BannerListForm.class);
        return VOUtil.setJsonpResult(bannerT2BizService.func_banner_list(form), jsonpcallback);
    }
}
